package com.zjj2;

import java.util.logging.Logger;

public class Test2 {
    public static Logger log =Logger.getLogger(Test2.class.getName());;

//    static {
//        try{
//            SimpleFormatter formatter = new SimpleFormatter();
//注意此处的./是在项目路径下，而非模块_1jul路径下
//            FileHandler handler = new FileHandler("./_1jul/logs/jul.log");
//            handler.setFormatter(formatter);
//            log.addHandler(handler);
//
//            log.warning(log.getName()+" log initialize ok ");
//
//        }catch (IOException e){
//            log.severe(e.getMessage());
//        }
//
//    }

    public static void amethod(){
        log.info(log.getName()+" HAHA哈哈");
    }
}
